package org.brownflat.watergate.job;

import org.brownflat.watergate.service.ConfigurationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.SimpleTriggerBean;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * <p>&copy Rupert Jones 2012</p>
 *
 * @author rup
 */
@Component
public class InitiateScanIntervalTrigger extends SimpleTriggerBean {
    @Autowired
    private ConfigurationService configurationService;

    @PostConstruct
    public void init() {
        setRepeatInterval(configurationService.getScanInterval());
    }
}
